home *** CD-ROM | disk | FTP | other *** search
/ Learn Microsoft Visual Basic 6.0 Now / Learn Microsoft Visual Basic 6.0 Now (Microsoft Press)(X03-58607)(1998).ISO / media / chap01 / b01d020.cc2 < prev    next >
Text File  |  1998-06-07  |  4KB  |  79 lines

  1. 0, Okay, let's continue creating our Lucky 
  2. 3, Seven program by setting properties for 
  3. 5, the seven objects on our form. To set a 
  4. 8, property for an object, you must first 
  5. 9, select the object on your form. Let's 
  6. 11, start by setting the Caption property for 
  7. 13, the Command1 object. First, we'll click 
  8. 16, the command button on the form. Then 
  9. 20, we'll double-click the title bar of the 
  10. 22, Properties window to get a better look at 
  11. 23, our property settings. The property 
  12. 26, setting that we want to change is Caption, 
  13. 29, which controls the text that is displayed 
  14. 31, in the command button when the program 
  15. 32, runs. We'll click the Caption setting in 
  16. 35, the Properties window, click the setting, 
  17. 39, which is currently Command1, and set 
  18. 42, the new setting to be Spin. We'll do the 
  19. 47, same thing for the second command button. 
  20. 49, We'll click the command button, we'll 
  21. 52, click the Caption property, and we'll 
  22. 55, type End for that command button's name. 
  23. 60, Okay, let's continue by setting the 
  24. 62, property settings for the first three label 
  25. 64, objects on our program. Since these will 
  26. 68, have the same property settings,we'll set 
  27. 69, them as a group. First, we'll click the 
  28. 72, first label object. Then, we'll hold 
  29. 74, down the Shift key and click the second 
  30. 76, and third label objects. Now, we'll go to 
  31. 81, the Properties window and select a 
  32. 84, border style, which is Fixed Single. That 
  33. 89, will give a 3-D effect to our buttons. 
  34. 93, We'll set Alignment to Center, which will 
  35. 97, center our numbers. And we'll change the 
  36. 100, font using the Font dialog box. To make 
  37. 105, our numbers look big and bold, we'll 
  38. 107, select Times New Roman, bold, 24-point. 
  39. 116, Right now, the word Label appears in our 
  40. 118, buttons, but we'll change that with program 
  41. 121, code when the program runs. Now let's 
  42. 124, set the text that will appear in the 
  43. 126, Label4 object. This should be the program 
  44. 129, title, Lucky Seven. So, we'll go over to 
  45. 133, the Properties window, click the Caption 
  46. 137, property, and type Lucky Seven. Then, 
  47. 146, we'll use the Font dialog box to select 
  48. 149, Arial, bold, 24-point type. And we'll use 
  49. 160, the ForeColor property to change the 
  50. 162, color of the font to dark purple. Now, 
  51. 171, let's set the properties for the last object 
  52. 173, on our form, the image box object. 
  53. 177, First, we'll click the image object, we'll 
  54. 179, set the Stretch property to True, and 
  55. 184, we'll specify the picture with the Picture 
  56. 186, property setting. We can use the Load 
  57. 191, Picture dialog box to scroll to our 
  58. 193, picture, which is named Coins.wmf. This is a 
  59. 200, metafile that will display a stack of 
  60. 202, coins when the user wins. Since the user 
  61. 205, hasn't won yet, we want to start by 
  62. 206, setting the Visible property setting to False 
  63. 210, with the image object. If you think of a 
  64. 215, better property setting, you can always 
  65. 217, change it. I've decided I don't like 
  66. 219, those unsightly label tags in the spinner 
  67. 222, windows at the top of the form. So, I'm 
  68. 224, going to click each of those windows 
  69. 225, individually and remove the Caption 
  70. 227, properties. I'll remove the first property, and 
  71. 235, I'll remove the second property, and 
  72. 239, I'll remove the third property. Now, we're 
  73. 244, finished setting properties for our 
  74. 247, Visual Basic form. And so, let's close our 
  75. 249, Properties window by double-clicking the 
  76. 251, title bar. In the next demonstration, 
  77. 254, you'll see how to use program code to 
  78. 256, finalize your application.
  79. 258, END